<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link href="css/zTreeStyle/zTreeStyle.css" rel="stylesheet" type="text/css">					<!-- zTree CSS函式庫 -->
<link href="css/redmond/jquery-ui-1.10.3.custom.min.css" rel="stylesheet" type="text/css">	<!-- jquery UI CSS -->
<link href="css/selfTemplate.css" rel="stylesheet" type="text/css">							<!-- homemade CSS -->

<script src="js/jquery-2.1.0.min.js" type="text/javascript"></script>						<!-- jquery -->
<script src="js/jquery-ui-1.10.3.custom.js" type="text/javascript"></script>				<!-- jquery UI -->
<script src="js/jquery.ztree.core-3.5.min.js" type="text/javascript"></script>				<!-- zTree 的核心函式庫，選擇SVN用 -->
<script src="js/jquery.ztree.excheck-3.5.min.js" type="text/javascript"></script>			<!-- zTree 的延伸函式庫，選擇SVN用 -->
<script src="js/jquery.cookie.js" type="text/javascript"></script>							<!-- cookie -->
<script src="js/widgets.js" type="text/javascript"></script>								<!-- homemade js -->

<script type="text/javascript">

/** 為了產生zTree的參數 **/
var setting = { check: { enable: true, chkStyle: "radio", radioType: "level" }, data: { simpleData: { enable: true } } };
var initialValue = 60;

function but(str) {
	if( str=='y' ) {
		clearErrorMsg();
		var tmp = "<button type='button' id='btnISreport'>完成</button>";
		$("#btnISreport").remove();
		$("#tdBtnISreport").append(tmp);
		$("#btnISreport").bind("click",function(){
			btnClick();
		}).button();
		$("#dialogISreport").dialog("close");
	} else {
		$("#dialogISreport").dialog("close");
	}
}

function butReq(isClose) {
	if( isClose=="y" ) {
		/* 將checkbox有勾選的項目，加入列表 */
		$("#tbodyReq > tr").remove();	//將原本有選的刪除
		$("input.tableReqPickerChk").each(function(i){
			if ($(this).is(":checked")) {
				var idx= $("#tbodyReq > tr").size()+1;
				var obj =$(this).parent();
				var reqSId = $(this).parent().parent().attr("reqSId");
		    	var tmp = "<tr reqSId='"+reqSId+"' class='rowReq"+idx+"'>"+
					"<td class='center'><button type='button' onclick=\"removeRow(this,'Req')\">-</button></td>"+
					"<td class='idx'>"+idx+"</td>"+
					"<td reqSId='"+reqSId+"'>"+ obj.next().next().html()+"</td>"+
					"<td reqSId='"+reqSId+"'>"+ obj.next().next().next().html()+"</td>"+
					"</tr>";
				$("#tbodyReq").append(tmp);
			}
		});
							
		refreshUI(1,"tbodyReq",false);
		$("#reqsPicker").dialog("close");
	} else {
		$("#reqsPicker").dialog("close");
	}
}

function selSVNfile(svnType) {
	clearErrorMsg();
	windowFreeze();
	var subsysId = $("select#subsysId option:selected").val();
	
	//先確定該子系統 的SVN 連線無誤，再進行抓取
	// 0 無進行測試 1 沒有為此子系統設定 2 主機不能連 3 帳密不通  4 連線正常
	var svnUrl = $("#svnUrl").val();
	var svnId = $("#svnId").val();
	var svnPwd = $("#svnPwd").val();
	var reversion = $("#ver").val();
	var res= chkSVNconnection(svnUrl, svnId, svnPwd );
	
	if (res==0) {
		errorMsgShow("SVN連線發生問題，請洽系統人員");
	} else if (res==1) {
		errorMsgShow("沒有為此子系統設定SVN，請洽系統人員");
	} else if (res==2) {
		errorMsgShow("所設定的主機連線失敗，請洽系統人員");
	} else if (res==3) {
		errorMsgShow("所設定的帳密登入失敗，請洽系統人員");
	} else {	//連線成功
		var isMR = (svnType=="MR")?true:false;
	
		$.ajax({ type:'post',url:"QuerySVNfileInJsonBySubsys4Dep",dataType:'text',async:false,
			data: {svnUrl:svnUrl,svnId:svnId,svnPwd:svnPwd,is4Dep:false,svnVer:reversion }, //送出子系統，以確定要使用該子系統的SVN
			success : function(reses) {
				if ( reses.length != 3 ) {	//因為servlet那裡這樣寫，所以回傳 "]" 表示沒有找到
					reses = reses.substring(1,(reses.length-1));
					
					$.fn.zTree.init( $("#treeDirectory"),setting, JSON.parse(reses) );
					var treeObj = $.fn.zTree.getZTreeObj("treeDirectory");
					treeObj.expandAll(false);
					$("#dialogSVNdirectory").prop("title","選擇欲繳交的資料夾").css("visibility", "visible").dialog({
						resizable:true,width:300,modal:true,show:"fold",hide:"fold",
						buttons : {
							"確定" : function() {
						        var dirPath = treeObj.getCheckedNodes(true)[0];
								$("#path").val(dirPath.id);
								getRelatedReqs(svnUrl,svnId,svnPwd,reversion);
								$(this).dialog("close");
							},"關閉" :function() {
								$(this).dialog("close");
							}
						}
					});
				} else {
					alert("資料夾為空!");
				}
			}, error : function(xhr, ajaxOptions, thrownError) { errorAjx(xhr); }
		});
	} // end of else
	windowUnfreeze();
}

//主管按下同意或拒絕的鈕
function reply(obj,isApprove) {
	clearErrorMsg();
	windowFreeze("執行中..");
	
	$("button").prop("disabled",true);	//將操作的按鈕給disable
	
	
	
	$.ajax({ type:"post",url:"ApproveChkIn",dataType:"text",async:false,
		data: {
			toDoListId:$.cookie("toDoListId"),
			subsysId:$("select#subsysId option:selected").val(),
			creatorId:$(obj).attr("creatorId"),
			empId:$.cookie("empId"),
			empName:$.cookie("empName"),
			chkInId:$.cookie("chkInId"),
			isApprove:isApprove
		}, success : function(reses) {
			$("button.reply").remove();
			$("tr.review > td:first").append("<button id='backToDoList' type='button' onclick=\"window.location='toDoList.html'\">回到待辦事項</button>");
			$("#backToDoList").button();
		}, error : function(xhr, ajaxOptions, thrownError) { errorAjx(xhr); }
	});
	windowUnfreeze();
}

function btnClick() {
	$("#dialogISreport").prop("title","回覆資安檢查報告").css("visibility", "visible").dialog({
		resizable:true,modal:true,show:"fold",hide:"fold",width:"1000",async:false,
		buttons : {
			"確定" : function() {
				var tmp = "<button type='button' id='btnISreport'>完成</button>";
				$("#btnISreport").remove();
				$("#tdBtnISreport").append(tmp);
				$("#btnISreport").bind("click",function(){
					btnClick();
				}).button();
				$(this).dialog("close");
			},"關閉" :function() {
				$(this).dialog("close");
			}
		}
	});
}


$(document).ready(function() {	
	var pageName = "chkin.html";
	init(pageName);
	querySubsys($.cookie("empId"), pageName, "subsysId",$.cookie("localSystemId") );
	
	//為了重覆使用此頁面，利用此cookie來辨別目前的動作
	if ( $.cookie("actType") !=undefined ) {
		if ( $.cookie("actType") == "review" ) {
			var cir = "";
			
			//取得待辦事項清單
			$.ajax({type:'post',url:'IsComplete',dataType : 'text',async:false,
				data: {itemType:2,masterId:$.cookie("chkInId")},
				success : function(res) {
					cir = JSON.parse( res );
				}, error : function(xhr, ajaxOptions, thrownError) { errorAjx(xhr); }
			});
			
			$("#btnSubmit").hide();	//送出繳交申請的鈕藏起來
			$.removeCookie("actType");			//供頁面辨別目前這個頁面要如何回應
			
			//開始將取得的值寫入螢幕
			$("#ver").val( cir.reversion );
			$("#path").val( cir.svnPath ); 
			$("button.reply").attr("creatorId", cir.applier);
			 
			
			$.each(cir.reqs,function(i,req){
				var idx= $("#tbodyReq > tr").size()+1;
				var reqSId = req.i1;
			    var tmp = "<tr reqSId='"+reqSId+"' class='row"+idx+"'>"+
					"<td class='center'><button class='apply'>-</button></td>"+
					"<td class='idx'>"+idx+"</td>"+
					"<td class='engN left'>"+ req.s1+"</td>"+
					"<td class='zhTwN left'>"+ req.s2+"</td>"+
					"</tr>";
				$("#tbodyReq").append(tmp);
			});
			refreshUI(1,"tbodyReq",false);
			
			//開始處理資安檢查報告
			$("#btnISreport").text("檢視");
			var isr = cir.isr;
			$.each(isr.t8, function(i,t8){
				if( t8.b1 ) {
					$("#is"+t8.i1+"Y").attr("checked",true);
				} else {
					$("#is"+t8.i1+"N").attr("checked",true);
				}
				$("#is"+t8.i1+"TextArea").text( t8.s1 );
			});
			$.each(isr.t9, function(i,t9){
				if( t9.b1 ) {
					if( t9 != 1 ) {
						$("#is9"+t9.i1+"Y").attr("checked",true);
					} else {
						$("#is9Y").attr("checked",true);
					}
				} else {
					if( t9 != 1 ) {
						$("#is9"+t9.i1+"N").attr("checked",true);
					} else {
						$("#is9N").attr("checked",true);
					}
				}
			});
			
			$(".apply").attr("disabled",true);
			$("input.apply").attr("readonly",true);
			$("button.apply").attr("disabled",true);
		}
	} else {
		$(".review").hide();	//審核的案鈕藏起來
		$("button.apply").attr("disabled",false);
	}
		
	$.ajax({type:"post",url:"QuerySubsys4Maintain",dataType:"json",async:false,
		data: {subsysId:$("select#subsysId option:selected").val()},
		success : function(res) {
			if ( res.length > 0 ) {
				$("#svnUrl").val( res[0]).prop("size",$("#svnUrl").val().length*0.9);
				$("#svnId").val( res[1]);
				$("#svnPwd").val( res[2]);
				$.ajax({type:"post",url:"QuerySVNver",dataType:"text",async:false,
					data: {url:$("#svnUrl").val(),usr:$("#svnId").val(),pwd:$("#svnPwd").val() }, //送出子系統，以確定要使用該子系統的SVN
					success : function(reses) {
						if ( isPositiveNumaric( reses ) ) {
							$("#reversion").val( reses).prop("size",$("#reversion").val().length);	
						} else {
							$(".editable").prop("disabled",true);
							errorMsgShow("SVN連線發生錯誤，請與系統管理人員連絡",reses);
						}
					},error : function(xhr, ajaxOptions, thrownError) { errorAjx(xhr); }
				});
			} else {
				$("button").attr("disabled",true);
			}
		},error : function(xhr, ajaxOptions, thrownError) { errorAjx(xhr); }
	});
	
	
	
	$("#ver").bind("keyup",function(){
		return validateNumber(this,this.value); 
	});
	
	
	$("#btnISreport").bind("click", function(){
		btnClick();
	});
	
	
	$("#btnAddReq").bind("click", function(){
		addReq("Req");
	});
	
	$("#btnSelDir").bind("click", function(){
		clearErrorMsg();
		var ver = $("#ver").val();
		if ( ver.length ==0 ) {
			$("#errShortMsg").html("請先輸入版次");
		} else {
			if ( ver > parseInt( $("#reversion").val() ) || ver == 0) {
				$("#ver").val( parseInt( $("#reversion").val() ));
			}
			selSVNfile("OL");
		}
	});
	
	$("#btnSubmit").bind("click", function(){
		clearErrorMsg();
		var ver = $("#ver").val();
		var path = $("#path").val();
		var reqSize = $("#tbodyReq tr").size();
		if ( ver.length ==0 || path.length ==0 || reqSize==0 ) {
			$("#errShortMsg").html("資料輸入不完整");
		} else if ( $("#btnISreport").text()=="未完成" ){
			$("#errShortMsg").html("請填寫資安檢查報告");
		} else {
			windowFreeze();

			//取得資安檢查報告內容
			var t8 = [];
			for(var i=1;i<=8;i++) {
				t8.push({"i1":i,"b1":$("input[name='is"+i+"']:checked").val(),"s1":$("#is"+i+"TextArea").val()});
			}
			var t9 = [];
			t9.push( $("input[name='is9']:checked").val() );
			for(var i=1;i<=14;i++) { t9.push( $("#is9"+i).is(":checked") ); }
			var isr = {"t8":t8,"t9":t9};

			var reqArray = [];
			//擷取個別需求
			$("#tbodyReq tr").each( function(j) {
				var reqSId = $(this).attr("reqSId");			//需求ID
				var reqId = $(this).children("td:eq(2)").html();
				var reqDesc = $(this).children("td:eq(3)").html();
				reqArray.push({"i1":reqSId,"s1":reqId,"s2":reqDesc});
			});
			var chkInRecord={
				"subsysId":$("select#subsysId option:selected").val(),				 //子系統
				"subsysDesc":getLeftPar( $("select#subsysId option:selected").html() ),				//子系統
				"isOL":true,						//是否為每日建置
				"svnIP":$("#svnUrl").val(),		//svnIP
				"svnID":$("#svnId").val(),			//svnID
				"svnPwd":$("#svnPwd").val(),		//svn密碼
				"svnPath":$("#path").val(),	//svn路徑
				"reversion":$("#ver").val(),
				"status":0,
				"applier":$.cookie("empId"),
				"reqs": reqArray,
				"isr":isr
			}
			
			
			chkInRecord = JSON.stringify(chkInRecord);
			
			$.ajax({type:"post",url:"CreateChkInRecord",dataType:"json",async:false,
				data:{ chkInRecordJson:chkInRecord,localSystemName:$.cookie("localSystemName"),empId:$.cookie("empId"),empName:$.cookie("empName") },
				success : function(res) {
					windowUnfreeze();
					if (res.isSuccess) {
					/* $("#tbodyReq tr").remove();
						$("#path").val(null);
						$("#ver").val(null); */
						alert("完成");
					} else { 
						errorMsgShow(res.shortErrorMessage);
					}
				},error : function(xhr, ajaxOptions, thrownError) { windowUnfreeze(); errorAjx(xhr); }
			});
		}
	});
	
	
	$("button").button();
});
</script>

</head>
<body>
	<div id="header"></div>		<!-- 畫面抬頭 -->
	<p>
	<img src="pic/chkin.png" > 
	<p>
	
	<div>
		<table>
			<thead class="tableFirst">
				<tr class="review">
					<td class="right">
						<button class="zhTwN reply" type="button" id="btnAgree" onclick="reply(this,1)">同意</button>
						<button class="zhTwN reply" type="button" id="btnDisagree" onclick="reply(this,0)">拒絕</button>
					</td>
					<td class="left zhTwN">說明：<input type="text"></td>
				</tr>
				<tr>
					<td colspan="2" class="left"><button class="zhTwN" type="button" id="btnSubmit">送出</button></td>
					
				</tr>
				<tr><th class="right zhTwN">系統：</th><td class="left"><select id="subsysId"></select></td></tr>
				<tr><th class="right engN">repo:</th>
					<td class="left">
						<input id="svnUrl" type="text" readonly class="engN"/>
						<input id="svnId" type="hidden"/>
						<input id="svnPwd" type="hidden"/>
					</td>
				</tr>
				<tr><th class="right engN">reversion:</th><td class="left"><input id="reversion" type="text" readonly class="engN"></td></tr>
				
				<tr><td colspan="2" >&nbsp;</td></tr>
				<tr><th class="right">版次：</th><td class="left"><input id="ver" type="text" size="7" maxlength="8" class="int apply"></td></tr>
				<tr><th class="right">資料夾：</th><td class="left"><input class="engN apply" id="path" type="text" readonly ><button type="button" class="zhTwN apply" id="btnSelDir">選擇</button></td></tr>
				<tr><th class="right">資安檢查報告：</th><td id="tdBtnISreport" class="left"><button type="button" id="btnISreport">未完成</button></td></tr>
			</thead>		
		</table>
		<p><p>
		
		<table id='tableReq'>
			<thead class='tableFirst'>
				<tr><th class="zhTwN left" colspan="2">相關需求</th><td colspan="2">&nbsp;</td></tr>
				<tr><td><button class="apply" type='button' id="btnAddReq">+</button></td><th>#</th><th>需求ID</th><th>需求描述</th></tr>
			</thead>
			<tbody id='tbodyReq'></tbody>
		</table>
	</div>
</body>


<div class="dialog" id="dialogISreport">
	<table>
		
		<thead class="tableFirst">
			<tr><td class="left" colspan="6"><button class="apply" onclick="but('y')" type="button">確定</button><button onclick="but('n')" type="button">關閉</button></td></tr>
			<tr><td class="left" colspan="6">&nbsp;</td></tr>
			<tr><th colspan="2">#</th><th colspan="2">分析項目</th><th colspan="2">結果</th><th>檢查結果說明</th></tr>
		</thead>
		<tbody>
			<tr>
				<td colspan="2" rowspan="2" class="center engN">1.</td>
				<td rowspan="2" colspan="2" class="zhTwN left">是否需要身分鑑別與權限檢查功能?</td>
				<td class="center"><input class="apply" type="radio" name="is1" id="is1Y" value="true" checked></td>
				<td class="zhTwN">是</td>
				<td rowspan="2"><textarea class="apply" id="is1TextArea" rows="1" cols="12"></textarea></td>
			</tr>
			<tr>
				<td class="center"><input class="apply" type="radio" name="is1" id="is1N" value="false"></td>
				<td>否</td>
			</tr>
			<tr bgcolor="#EAF4FD">
				<td colspan="2" rowspan="2" class="center engN">2.</td>
				<td rowspan="2" colspan="2" class="zhTwN left">是否需要使用者輸入資料檢查功能?</td>
				<td class="center"><input class="apply" type="radio" name="is2" id="is2Y" value="true" checked>
				<td class="zhTwN">是</td>
				<td rowspan="2"><textarea class="apply" id="is2TextArea" rows="1" cols="12"></textarea></td>
			</tr>
			<tr bgcolor="#EAF4FD">
				<td class="center"><input class="apply" type="radio" name="is2" id="is2N" value="false"></td>
				<td>否</td>
			</tr>
			<tr>
				<td colspan="2" rowspan="2" class="center engN">3.</td>
				<td rowspan="2" colspan="2" class="zhTwN left">是否需要資料加密儲存或加密傳輸功能?</td>
				<td class="center"><input class="apply" type="radio" name="is3" id="is3Y" value="true" checked>
				<td class="zhTwN">是</td>
				<td rowspan="2"><textarea class="apply" id="is3TextArea" rows="1" cols="12"></textarea></td>
			</tr>
			<tr>
				<td class="center"><input class="apply" type="radio" name="is3" id="is3N" value="false"></td>
				<td>否</td>
			</tr>
			<tr bgcolor="#EAF4FD">
				<td colspan="2" rowspan="2" class="center engN">4.</td>
				<td rowspan="2" colspan="2" class="zhTwN left">是否需要訊息完整性檢查功能?</td>
				<td class="center"><input class="apply" type="radio" name="is4" id="is4Y" value="true" checked></td>
				<td class="zhTwN">是</td>
				<td rowspan="2"><textarea class="apply" id="is4TextArea" rows="1" cols="12"></textarea></td>
			</tr>
			<tr bgcolor="#EAF4FD">
				<td class="center"><input class="apply" type="radio" name="is4" id="is4N" value="false"></td>
				<td>否</td>
			</tr>
			<tr>
				<td colspan="2" rowspan="2" class="center engN">5.</td>
				<td rowspan="2" colspan="2" class="zhTwN left">處理程式發生錯誤時之安全需求?</td>
				<td class="center"><input class="apply" type="radio" name="is5" id="is5Y" value="true" checked></td>
				<td class="zhTwN">是</td>
				<td rowspan="2"><textarea class="apply" id="is5TextArea" rows="1" cols="12"></textarea></td>
			</tr>
			
			<tr>
				<td class="center"><input class="apply" type="radio" name="is5" id="is5N" value="false"></td>
				<td>否</td>
			</tr>
			<tr bgcolor="#EAF4FD">
				<td colspan="2" rowspan="2" class="center engN">6.</td>
				<td rowspan="2" colspan="2" class="zhTwN left">是否需要資料輸出正確性檢核或完整性保護(防竄改、偽造)之功能?</td>
				<td class="center"><input class="apply" type="radio" name="is6" id="is6Y" value="true" checked></td>
				<td class="zhTwN">是</td>
				<td rowspan="2"><textarea class="apply" id="is6TextArea" rows="1" cols="12"></textarea></td>
			</tr>
			<tr bgcolor="#EAF4FD">
				<td class="center"><input class="apply" type="radio" name="is6" id="is6N" value="false"></td>
				<td>否</td>
			</tr>
			<tr>
				<td colspan="2" rowspan="2" class="center engN">7.</td>
				<td rowspan="2" colspan="2" class="zhTwN left">是否有特殊系統權限與資源需求或限制?</td>
				<td class="center"><input class="apply" type="radio" name="is7" id="is7Y" value="true" checked></td>
				<td class="zhTwN">是</td>
				<td rowspan="2"><textarea class="apply" id="is7TextArea" rows="1" cols="12"></textarea></td>
			</tr>
			<tr>
				<td class="center"><input class="apply" type="radio" name="is7" id="is7N" value="false"></td>
				<td>否</td>
			</tr>
			<tr bgcolor="#EAF4FD">
				<td colspan="2" rowspan="2" class="center engN">8.</td>
				<td rowspan="2" colspan="2" class="zhTwN left">是否需要操作記錄功能?</td>
				<td class="center"><input class="apply" type="radio" name="is8" id="is8Y" value="true" checked></td>
				<td class="zhTwN">是</td>
				<td rowspan="2"><textarea class="apply" id="is8TextArea" rows="1" cols="12"></textarea></td>
			</tr>
			<tr bgcolor="#EAF4FD">
				<td class="center"><input class="apply" type="radio" name="is8" id="is8N" value="false"></td>
				<td>否</td>
			</tr>
			<tr><td rowspan="15" class="int">9.</td><th colspan="5" class="zhTwN left">原始程式碼檢查<input class="apply" type="radio" name="is9" id="is9Y" value="true" checked>合格<input class="apply" type="radio" name="is9"  value="false" id="is9N">不合格</th></tr>
			<tr><td><input type="checkbox" checked class="apply" id="is91"></td><td colspan="5" class="zhTwN left">已符合程式開發之規範</td></tr>
			<tr bgcolor="#EAF4FD"><td><input type="checkbox" checked class="apply" id="is92"></td><td colspan="5" class="zhTwN left">不含需求以外之功能</td></tr>
			<tr><td><input type="checkbox" checked class="apply" id="is93"></td><td colspan="5" class="zhTwN left">不含惡意程式碼及木馬程式</td></tr>
			<tr bgcolor="#EAF4FD"><td><input type="checkbox" checked class="apply" id="is94"></td><td colspan="5" class="zhTwN left">不得將程式帳號以明文方式儲存於程式碼</td></tr>
			<tr><td><input type="checkbox" checked class="apply" id="is95"></td><td colspan="5" class="zhTwN left">不得於系統中暗藏洩露未經授權資訊之通道或程式</td></tr>
			<tr bgcolor="#EAF4FD"><td><input type="checkbox" checked class="apply" id="is96"></td><td colspan="5" class="zhTwN left">網頁程式中使用之參數，包含表單隱藏欄位、查詢字串與Cookie等，應考量系統可行性避免參數值在網頁處理中遭受竄改</td></tr>
			<tr><td><input type="checkbox" checked class="apply" id="is97"></td><td colspan="5" class="zhTwN left">網頁程式不可在有效時間較長的Cookie中與程式碼中儲存機密級以上之資料</td></tr>
			<tr bgcolor="#EAF4FD"><td><input type="checkbox" checked class="apply" id="is98"></td><td colspan="5" class="zhTwN left">網站程式應隱藏核心程式碼，並避免使用動態SQL查詢</td></tr>
			<tr><td><input type="checkbox" checked class="apply" id="is99"></td><td colspan="5" class="zhTwN left">網站程式應避免直接存取網站目錄以外之系統檔案</td></tr>
			<tr bgcolor="#EAF4FD"><td><input type="checkbox" checked class="apply" id="is910"></td><td colspan="5" class="zhTwN left">執行於用戶端瀏覽器的網頁程式不應直接連接資料庫</td></tr>
			<tr><td><input type="checkbox" checked class="apply" id="is911"></td><td colspan="5" class="zhTwN left">網頁應用程式需建立安全的例外管理機制，在失敗的網頁中應回傳易懂但避免洩漏內部系統詳細資料的錯誤訊息至用戶端，且妥善回應錯誤事件或應用程式失效發生的例外，不提供任何有助於攻擊者利用的應用程式弱點細節</td></tr>
			<tr bgcolor="#EAF4FD"><td><input type="checkbox" checked class="apply" id="is912"></td><td colspan="5" class="zhTwN left">資訊系統上之程式開發，應考量系統可行性建立輸入驗證機制，限制並過濾可能作為系統命令執行之輸入字元，且拒絕任何潛藏惡意字串之使用者輸入，以確保程式所收到的輸入是有效且安全</td></tr>
			<tr><td><input type="checkbox" checked class="apply" id="is913"></td><td colspan="5" class="zhTwN left">資訊系統應用程式須建立安全的例外管理機制，在失敗的程式中應回傳易懂但避免洩漏內部系統詳細資料的錯誤訊息至用戶端，且妥善回應錯誤事件或應用程式失效發生的例外，不提供任何有助於攻擊者利用的應用程式弱點細節</td></tr>
			<tr bgcolor="#EAF4FD"><td><input type="checkbox" checked class="apply" id="is914"></td><td colspan="5" class="zhTwN left">資訊系統應用程式應於資料處理程序完成後清除暫存檔或留存記憶體中之資料</td></tr>
		</tbody>
	</table>
</div>

<div class="dialog" id="dialogSVNdirectory">
	<ul id="treeDirectory" class="ztree"></ul>
</div>

<!-- 選取需求的對話窗 -->
<div class="dialog" id="reqsPicker">
	<table id="tableReqPicker">
		<thead class="tableFirst">
			<tr><td class="left" colspan="6"><button class="apply" onclick="butReq('y')" type="button">確定</button><button onclick="butReq('n')" type="button">關閉</button></td></tr>
			<tr><td class="left" colspan="6">&nbsp;</td></tr>
			<tr>
				<th class="center"><input id="tableReqPickerChkALL" onclick="chkALL(this);" type="checkbox" /></th>
				<th>#</th>
				<th>需求ID</th>
				<th>需求描述</th>
				<th>創建日期</th>
				<th>創建人員</th>
			</tr>
		</thead>
		<tbody id="tbodyReqPicker"></tbody>
	</table>
</div>
</html>